package com.andyage.admin.action;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.andyage.admin.bean.ActivityBean;
import com.andyage.admin.service.IActivityService;

@Controller
@RequestMapping("/admin")
public class ActivityAction {
	@Resource
	private IActivityService iactivityService;
	@RequestMapping("/queryActivityInfo")
	public void queryActivityInfo(HttpServletResponse response,ActivityBean activity) {
		try {
			String json = iactivityService.queryActivityInfo(activity);
			response.setContentType("text/html;charset=utf-8");
			response.getWriter().println(json);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	
	@RequestMapping("/updateActivityPublish")
	public void updateActivityPublish(HttpServletResponse response,ActivityBean activity) {
		try {
			String json = iactivityService.updateActivityPublish(activity);
			response.setContentType("text/html;charset=utf-8");
			response.getWriter().println(json);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
